<?php

declare(strict_types=1);

namespace App\Constants\Common;

use Hyperf\Constants\Annotation\Constants;
use Hyperf\Constants\Annotation\Message;
use Hyperf\Constants\EnumConstantsTrait;

/**
 * 接口-状态-枚举类
 */
#[Constants]
enum ApiStatusEnum: int
{
        use EnumConstantsTrait;

        #[Message("enum.common.apiStatus.200")]
        case SUCCESS = 200;

        #[Message("enum.common.apiStatus.400")]
        case ERROR = 400;

        #[Message("enum.common.apiStatus.401")]
        case UNAUTHORIZED = 401;

        #[Message("enum.common.apiStatus.403")]
        case FORBIDDEN = 403;

        #[Message("enum.common.apiStatus.404")]
        case NOT_FOUND = 404;

        #[Message("enum.common.apiStatus.405")]
        case METHOD_NOT_ALLOWED = 405;

        #[Message("enum.common.apiStatus.408")]
        case REQUEST_TIMEOUT = 408;

        #[Message("enum.common.apiStatus.500")]
        case INTERNAL_SERVER_ERROR = 500;

        #[Message("enum.common.apiStatus.501")]
        case NOT_IMPLEMENTED = 501;

        #[Message("enum.common.apiStatus.502")]
        case BAD_GATEWAY = 502;

        #[Message("enum.common.apiStatus.503")]
        case SERVICE_UNAVAILABLE = 503;

        #[Message("enum.common.apiStatus.504")]
        case GATEWAY_TIMEOUT = 504;

        #[Message("enum.common.apiStatus.505")]
        case HTTP_VERSION_NOT_SUPPORTED = 505;
}
